package study.java.thread03;

/**
* @Name: SellTicketThread
* @Description: 多线程练习（继承Thread类实现）
* @Author: 李超	lc_jack@foxmail.com
* @CreateDate: 2017-1-8 下午9:55:23 
* @Version: V1.0
 */
public class SellTicketThread extends Thread {
	
	private static int tickets = 100 ;
	
	public void run() {
		while(true) {
			if(tickets > 0) {
				System.out.println(getName() + "正在出售第[" + (tickets--) + "]张票");
			}
		}
	}

}
